import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/cupertino.dart';
import 'package:mahjong/entity/MessageContext.dart';
import 'package:mahjong/notify/CurrentUserInfo.dart';
import 'package:mahjong/util/CustomerDialog.dart';
import 'package:provider/provider.dart';

import 'AbstractMessageHandler.dart';
import 'package:mahjong/const/MahjongConst.dart';

class MessageActionTips extends AbstractMessageHandler {
  void doMessage(MessageContext message) {
    CurrentUserInfo user = Provider.of<CurrentUserInfo>(
        navigatorKey.currentContext,
        listen: false);
    user.updateTask(message.body);
    if (user.hasTask(MessageAction.DISK_DICE)) {
      CustomerDialog.showText("请转动筛子");
    }
  }
}
